package lib.bone.access.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class IsNepuValidator implements ConstraintValidator<IsNepu, Object> {

    @Override
    public void initialize(IsNepu constraintAnnotation) {
        ConstraintValidator.super.initialize(constraintAnnotation);
    }

    @Override
    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
       String name = o.toString();
       if (name.equals("东北石油大学")) return true;
       return false;
    }
}